package com.core.reach.cloudhub.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: RefreshScope注解实现动态获取配置信息的重要注解
 * @date 2020/3/27 10:45
 **/
@RefreshScope
@RestController
public class ConfigController {

    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/configInfo")
    public String getConfigInfo() {
        return this.configInfo;
    }
}
